package cn.kgc.novel.service.impl;

import cn.kgc.novel.mapper.MessageMapper;
import cn.kgc.novel.pojo.Message;
import cn.kgc.novel.service.MessageService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class MessageServiceImpl implements MessageService {

    @Resource
    private MessageMapper messageMapper;
    //查找公告
    @Override
    public List<Message> findMessage(String title) {
        return messageMapper.findMessage(title);
    }
    //添加公告
    @Override
    public void addMessage(Message message) {
        messageMapper.addMessage(message);
    }
    //回显公告
    @Override
    public Message echoMessage(Integer mid) {
        return messageMapper.echoMessage(mid);
    }
    //修改公告
    @Override
    public void updateMessage(Message message) {
        messageMapper.updateMessage(message);
    }
    //删除公告
    @Override
    public void deleteMessage(Integer mid) {
        messageMapper.deleteMessage(mid);
    }
}
